<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="base.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	$(function(){
		$("#btnReturn").click(function(){
			window.location.href= "<%=baseUrl%>
	index_handler.jsp";
		});

		$("#btnSubmit").click(function() {
			if ($("#account").val() == "") {
				art.dialog.alert('账号不能为空，请检查！');
				return false;
			}
			if ($("#name").val() == "") {
				art.dialog.alert('昵称不能为空，请检查！');
				return false;
			}
			if ($("#password").val() == "") {
				art.dialog.alert('密码不能为空，请检查！');
				return false;
			}
			if ($("#email").val() == "") {
				art.dialog.alert('邮箱不能为空，请检查！');
				return false;
			}
		});
	});
</script>
</head>
<body>
	<div style="width: 400px; margin: 0px auto;">
		<div style="border: solid 1px red; height: 30px; padding-top: 10px;">
			用户注册</div>

		<div
			style="border: solid 1px red; margin-top: 10px; text-align: center; padding-top: 5px; padding-bottom: 20px;">
			<form action="pages/register_handler.jsp" method="post">
				<div style="margin-top: 15px;">
					账号：<input type="text" name="account" id="account"
						style="width: 150px;">
				</div>
				<div style="margin-top: 15px;">
					昵称：<input type="text" name="name" id="name" style="width: 150px;">
				</div>
				<div style="margin-top: 15px;">
					密码：<input type="password" name="password" id="password"
						style="width: 150px;">
				</div>
				<div style="margin-top: 15px;">
					邮箱：<input type="text" name="email" id="email" style="width: 150px;">
				</div>
				<div style="margin-top: 15px;">
					<input type="submit" id="btnSubmit" value="确定">
					&nbsp;&nbsp;&nbsp;&nbsp; <input type="button" id="btnReturn"
						value="返回">
				</div>
				<div style="margin-top: 15px;color: red;">
					<%
						String msg = request.getAttribute("regMsg") == null?null:request.getAttribute("msg").toString();
						if(msg != null){
							out.print("错误信息：" + msg);
						}
					%>
				</div>
			</form>
		</div>
	</div>

</body>
</html>